<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>积木科技</title>
    <link rel="stylesheet" href="css/animate.css">
    <link rel="stylesheet" href="css/main.css?v=1">
    <!-- <script src="js/jquery.min.js" charset="utf-8"></script> -->
    <!-- <script src="js/jquery.backstretch.min.js" charset="utf-8"></script> -->
</head>

<body class="home">
    <img class="yword" src="img/home/yword.png" />
    <img class="word" src="img/home/word.png" />
    <img src="img/home/arrow.png" style="" id="array" class="resize">
    <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.js"></script>
    <script type="text/javascript">
        var mql = window.matchMedia('(orientation: portrait)');
        console.log(mql);
        function handleOrientationChange(mql) {
            if (mql.matches) {
                // console.log('竖屏'); // 竖屏
                $('body').css({
                  'background':'url(img/home/bgPortrait.jpg)',
                  'background-size':'100% 100%',
                })
            } else {
                // console.log('横屏'); // 横屏
                $('body').css({
                  'background':'url(img/home/bg.jpg)',
                  'background-size':'100% 100%',
                })
            }
        }
        // 输出当前屏幕模式
        handleOrientationChange(mql);
        // 监听屏幕模式变化
        mql.addListener(handleOrientationChange);
        // window.addEventListener('orientationchange', function(event) {
        //   console.log(window);
        //   if ( window.orientation == 180 || window.orientation==0 ) {
        //       alert("竖屏");
        //   }
        //   if( window.orientation == 90 || window.orientation == -90 ) {
        //       alert("横屏");
        //   }
        // });
        $('body').on('touchend', function() {
            var self = this;
            $(this).animate({
                opacity: 0
            }, 500, function() {
                window.location.href = "./jimu.html";
            });
        })
    </script>
    <script type="text/javascript" src='http://res.wx.qq.com/open/js/jweixin-1.0.0.js'></script>
    <script>
        wx.config({
            debug: false,
            appId: "${config.appId}",
            timestamp: "${config.timestamp}",
            nonceStr: "${config.nonceStr}",
            signature: "${config.signature}",
            jsApiList: [
                'onMenuShareTimeline', 'onMenuShareAppMessage'
            ]
        });
        wx.ready(function() {
            wx.onMenuShareTimeline({
                title: '积木科技', // 分享标题
                link: "${proUrl}/weixin/share", // 分享链接
                imgUrl: "${proUrl}/assets/blue/images/logo/logo3.png", // 分享图标
                success: function() {},
                cancel: function() {
                    // 用户取消分享后执行的回调函数
                }
            });
            wx.onMenuShareAppMessage({
                title: '积木科技', // 分享标题
                desc: '积木科技宣传书', // 分享描述
                link: "${proUrl}/weixin/share", // 分享链接
                imgUrl: "${proUrl}/assets/blue/images/logo/logo3.png", // 分享图标
                type: '', // 分享类型,music、video或link，不填默认为link
                dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
                success: function() {
                    // 用户确认分享后执行的回调函数
                },
                cancel: function() {
                    // 用户取消分享后执行的回调函数
                }
            });
        });
    </script>
</body>

</html>
